<?php
/**
 * Arquivo extende a classe Smarty
 */
require SMARTY_DIR.'Smarty.class.php';

class View extends Smarty
{
	function __construct()
	{
		parent::__construct();
		$this->compile_dir = APP_V.'template_c';
	}
	
	public function render($name){
		$name = explode('/',$name);
		$template_dir = APP_V.$name[0];
		$template = $name[1].'.tpl';
		$this->template_dir = $template_dir; 
		$file_header = APP_V.'header.tpl';
		$file_footer = APP_V.'footer.tpl';
		$this->assign('header',$file_header);
		$this->assign('footer',$file_footer);
		$this->display($template);
	}
} 
?>